package com.mit.common.maintenance.dto;

import org.apache.commons.lang.builder.ReflectionToStringBuilder;

import com.mit.common.dto.AbstractDTO;

public class ProductColorDTO extends AbstractDTO {
	private String code;
	private String name;
	private Integer color;
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Integer getColor() {
		return color;
	}
	public void setColor(Integer color) {
		this.color = color;
	}
	
	@Override
	public String toString() {
		return ReflectionToStringBuilder.reflectionToString(this);
	}
	
	@Override
	public boolean equals(Object obj) {
		if(obj == null)
			return false;
		if(! (obj instanceof ProductColorDTO))
			return false;
		return (((ProductColorDTO) obj).getId() == null)
				? (this.id == null)
				: (((ProductColorDTO) obj).getId().equals(this.id));
	}
}
